-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Global Alumni in external course sync #3330
Conversation
db4be03
to
ea098b3
Compare
When I first read the PR title, I thought it was for Google Analytics instead of Global Alumni. I think it would be good to spell out Global Alumni in the PR title and in the commit message. |
89fcad0
to
fb9277d
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
45857e5
to
4177d33
Compare
e51cf7c
to
d7d38f0
Compare
d562c0b
to
bd77a61
Compare
c1abfce
to
6cc95d8
Compare
1f6e7d0
to
37addea
Compare
3b010f1
to
02bbfb2
Compare
@@ -110,7 +110,7 @@ def external_course_data_with_non_usd_price(external_course_data): | |||
external_course_json = external_course_data.copy() | |||
external_course_json["list_currency"] = "INR" | |||
external_course_json["course_run_code"] = ( | |||
f"{external_course_data["course_run_code"].split("-")[0]}-INRC-98-10#1" | |||
f"{external_course_data['course_run_code'].split('-')[0]}-INRC-98-10#1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use double quotes. This applies to all the changes in the last 2 commits.
… to be more generic
c2cbace
to
bae5af0
Compare
@cachob, FYI, in this PR:
As previously discussed, we will keep syncing off for |
What are the relevant tickets?
https://github.com/mitodl/hq/issues/6107
Description (What does it do?)
This PR refactors the external course sync code to make it more generic and adds
Global Alumni
as a vendor. Additionally, it introduces thesync_daily
property in the Platform model, which is set toFalse
by default. For platforms that have an external API and require daily synchronization, thesync_daily
property should be set toTrue
. This can be updated via the Django admin interface.How can this be tested?
./manage.py migrate
sync_external_course_runs
task_sync_external_course_runs
, go to platform model in django admin./manage.py shell
Additional Context
The Emeritus and Global Alumni APIs return data with the same fields, except for the CEU field, which is present in Emeritus but not in Global Alumni.